package org.neurone.userspace.verification.impl;

import org.neurone.domain.UserInfo;
import org.neurone.userspace.userinfo.UserMgr;
import org.neurone.userspace.verification.Verification;

public class VerificationLocal implements Verification {
	private UserMgr userMgr;
	
	public UserMgr getUserMgr() {
		return userMgr;
	}

	public void setUserMgr(UserMgr userMgr) {
		this.userMgr = userMgr;
	}

	@Override
	public boolean verify(String userID, String passwd) {
		UserInfo u = this.userMgr.find(userID);
		
		if(u != null)
		{
			if(u.getPasswd().equals(passwd))
			{
				return true;
			}
		}
		
		return false;
	}

}
